1. Field of the Invention
The present invention generally relates to routing of packets in a computer network and, more particularly, to a controllable mechanism for by-passing Layer 4 (L4) classification.
2. Background Description
The problem of the design of computer networks is partitioned into smaller subtasks, by dividing the problem into layers. The OSI (Open Systems Interconnection) reference model defines seven layers. This invention is primarily concerned with the protocols of Layer 3, the network layer, and Layer 4, the transport layer. Each layer communicates with its peer layer in another node in the network through the use of a protocol. A multicast address is intended to be destined to a group of nodes, as opposed to a unicast address which is destined for a single node in the network.
The general purpose of packet classification in a switch, is to classify (or identify) packets arriving from a network interface. Actions can be associated with classification rules so that the actions can be applied to matching packets. Furthermore, it is the intention of this design to support this level of packet classification, and to apply the associated actions to the packets at xe2x80x9cwire speedxe2x80x9d.
The Classifier Tree itself is at the core of the Classifier. The tree contains packet-handling rules. Each rule defines what to do with a packet (action) when it matches the criteria specified in the rule (description). Only certain bits (or fields) in a packet are of interest to an individual tree which is inherent to the tree definition. (Individual trees, of course, may be interested in different fields.) Both the tree creator and searcher must agree on which fields define the rules in any given tree. The creator and searcher may execute on different processors, but there must be agreement between the two on how the tree is defined.
Rules are added to the tree by applications. Applications typically (but not always) are tasked with performing one type of action on packets. As long as different applications (e.g., Network Dispatcher, Layer 3 (L3) filtering, Quality of Service (QoS)) are interested in the same packet fields, they can contribute rules to the same trees. In other words, multiple action types are supported in the same tree as long as the contributors agree on what fields in the packet are of interest. Multiple Classifier trees may be supported on the same system. Applications may decide more than one Classifier tree is needed because (for example):
Applications are interested in different fields. It may not be practical for IP (Internet Protocol) and IPX (Internet Packet Exchange) filter rules to share the same table.
Search applications may be interested in only a subset of rules at a particular time. Perhaps one set of actions is relevant to packets as they are received and yet another set of actions is relevant when transmitting packets. Received actions could be placed in one tree, and transmit actions could be placed in another tree.
Normal processing flow, which includes Layer 4 (L4) classification, is slow, especially if the classifier is a Software Managed Tree (SMT) or includes an SMT component.
It is therefore an object of the present invention to provide a controllable mechanism for by-passing Layer 4 (L4) classification.
According to first and second embodiments of the invention, there is provided a method of routing a data packet which based on the insertion into a set of MAC rules in SA MAC lookup means a set of Layer 4 (L4) Skip Classification Flags. Routing is accomplished by selecting which rule to apply to the packet and reading the state of the corresponding L4 Skip Classification Flag. In response to a first state of said corresponding L4 Skip Classification Flag, performing an L4 classification followed by a routing of the data packet. In response to a second state of said corresponding L4 Skip Classification Flag, reading the state of a Global Classification Flag. In response to a first state of said Global Classification Flag, performing an L4 classification followed by a routing of said data packet. In response to a second state of said Global Classification Flag performing a routing of the data packet. The first embodiment does not use the option of reading the L4 Skip Classification Flag from the port table, whereas the second embodiment uses this option.
The third and fourth embodiments of the invention are similar to the first and second embodiments but with the addition of inserting into a set of Layer 3 (L3) rules in L3 lookup means a set of Layer 4 (L4) Classification Required Flags. The process proceeds by selecting which rule to apply to a packet and reading the state of the corresponding L4 Classification Required Flag. In response to a first state of the corresponding L4 Classification Required Flag, performing an L4 classification followed by a routing of the data packet. In response to a second state of said corresponding L4 Classification Required Flag, reading the state of the corresponding L4 skip Classification Flag. The remaining procedure is as with the first and second embodiments. The third embodiment does not use the option of reading the L4 skip Classification Flag from the port table, whereas the fourth embodiment uses this option.